<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/operationsinfo/operations_contractlist/q_operations_contractList.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/operationsinfo/operations_contractlist/q_operations_contractList.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'Operations_contractList',
                footer: "Foots",
                cnName: '运维合同明细',
                name: 'operations_contractlist/q_operations_contractList',
                url: "/q_operations_contractList/",
                sortName: "Brand"
            });
            const editFormFields = ref({"Brand":"","Type":"","Model":"","Price":"","Goods_num":""});
            const editFormOptions = ref([[{"title":"设备品牌","required":true,"field":"Brand","type":"text"},
                               {"title":"设备类型","field":"Type","type":"text"},
                               {"title":"设备型号","field":"Model","type":"text"},
                               {"title":"价格","field":"Price","type":"number"},
                               {"title":"数量","required":true,"field":"Goods_num","type":"number"}]]);
            const searchFormFields = ref({});
            const searchFormOptions = ref([]);
            const columns = ref([{field:'Operations_contractList',title:'ID',type:'guid',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'Operations_contract',title:'父级ID',type:'guid',width:110,hidden:true,align:'left'},
                       {field:'Brand',title:'设备品牌',type:'string',width:220,require:true,align:'left',sort:true},
                       {field:'Type',title:'设备类型',type:'string',width:110,align:'left'},
                       {field:'Model',title:'设备型号',type:'string',width:110,align:'left'},
                       {field:'Price',title:'价格',type:'decimal',width:110,align:'left'},
                       {field:'Goods_num',title:'数量',type:'float',width:110,require:true,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
